package net.oschina.app.ui;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.widget.ImageView;
import android.widget.TextView;

import net.oschina.app.R;
import net.oschina.app.base.BaseActivty;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by admin on 2017/7/16.
 */

public class LastActivity extends BaseActivty {
    @BindView(R.id.iv_return)
    ImageView ivReturn;
    @BindView(R.id.tv_toolbar)
    TextView tvToolbar;
    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.iv_last_view)
    ImageView ivLastView;
    @BindView(R.id.tv_last_view)
    TextView tvLastView;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.last_activity);
        ButterKnife.bind(this);
        Bundle extras = getIntent().getExtras();
        String toolbar_name = extras.getString("toolbar_name");
        String contenr = extras.getString("content");
        tvLastView.setText(contenr);
        if ("团队".equals(toolbar_name)) {
            Drawable drawable = this.getResources().getDrawable(
                    R.drawable.comment_line_triangle);
            tvToolbar.setText("");
            tvToolbar.setCompoundDrawables(drawable, null, null, null);
        } else {
            tvToolbar.setText(toolbar_name);
        }

    }

    @OnClick(R.id.iv_return)
    public void onViewClicked() {
        finish();
    }
}
